<%@ page import="com.minxi.jsp.javabean.Userinfo" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 陈晓东
  Date: 2024/6/15
  Time: 20:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>原神启动</title>
    <link rel="stylesheet" type="text/css" href="../css/home.css">
</head>
<body>

<%
    List<Userinfo> attribute = (List<Userinfo>) request.getSession().getAttribute("userList");
    String contextPath = request.getContextPath();
%>
<a href="<%=contextPath%>/jsp/add.jsp">新增</a>
<table>
    <tr>
        <th>编号</th>
        <th>用户名</th>
        <th>电话</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    <%for (Userinfo userinfo : attribute) { %>
    <tr>
        <td><%=userinfo.getId()%>
        </td>
        <td><%=userinfo.getUserName()%>
        </td>
        <td><%=userinfo.getUserPhone()%>
        </td>
        <td><%=1==userinfo.getUsersex()?"男":"女"%></td>
        <td><a href="<%=contextPath%>/del?id=<%=userinfo.getId()%>">删除</a></td>
        <td><a href="<%=contextPath%>/abcc?id=<%=userinfo.getId()%>">查看详情</a></td>
        <td><a href="<%=contextPath%>/detail?id=<%=userinfo.getId()%>">修改</a> </td>
    </tr>

    <%}%>
</table>
</body>
</html>
